unit dialogfind;

{$mode delphi}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  ComCtrls, ExtCtrls, StdCtrls;

type

  { TdlgFind }

  TdlgFind = class(TForm)
    bttnFindFind: TButton;
    bttnFindCancel: TButton;
    bttnFindInFilesFind: TButton;
    bttnFindInFilesCancel: TButton;
    groupFilesOptions: TCheckGroup;
    groupOptions: TCheckGroup;
    editFindText: TLabeledEdit;
    editFindTextInFiles: TLabeledEdit;
    PageControl: TPageControl;
    groupDirection: TRadioGroup;
    groupScope: TRadioGroup;
    groupOrigin: TRadioGroup;
    groupFilesWhere: TRadioGroup;
    tabFind: TTabSheet;
    tabFindInFiles: TTabSheet;
    procedure bttnFindFindClick(Sender: TObject);
    procedure bttnFindInFilesCancelClick(Sender: TObject);
    procedure bttnFindInFilesFindClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
    bttnClicked:Integer;//1 is bttnFindFind -- 2 is bttnFindInFilesFind
    selStartLast:Integer;
    selEndLast:Integer;
    lastSearched:String;
  end;

var
  dlgFind: TdlgFind;

implementation

{ TdlgFind }

procedure TdlgFind.bttnFindFindClick(Sender: TObject);
begin
    bttnClicked := 1;
    lastSearched := editFindText.Text;
    Close;
end;

procedure TdlgFind.bttnFindInFilesCancelClick(Sender: TObject);
begin
  bttnClicked := 0;
  Close;
end;

procedure TdlgFind.bttnFindInFilesFindClick(Sender: TObject);
begin
  bttnClicked := 2;
  lastSearched := editFindTextInFiles.Text;
  Close;
end;

procedure TdlgFind.FormCreate(Sender: TObject);
begin
  bttnClicked := 0;
end;

initialization
  {$I dialogfind.lrs}

end.

